public class demo {
    public static void main(String[] args) {
        StringBuffer a = new StringBuffer("A");
        StringBuffer b = new StringBuffer("B");
        toab(a,b);
        System.out.println(a+","+b);

    }

    private static void toab(StringBuffer a, StringBuffer b) {
        a.append(b);
        b=a;
    }
}
